package com.zlict.admin.service.impl;

import java.util.List;
import com.zlict.common.utils.DateUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zlict.admin.mapper.RdAssetsAmortizationDetailMapper;
import com.zlict.admin.domain.RdAssetsAmortizationDetail;
import com.zlict.admin.service.IRdAssetsAmortizationDetailService;

/**
 * 资产管理-无形资产摊销明细Service业务层处理
 * 
 * @author lqh
 * @date 2025-07-05
 */
@Service
@RequiredArgsConstructor
public class RdAssetsAmortizationDetailServiceImpl implements IRdAssetsAmortizationDetailService 
{
    private final RdAssetsAmortizationDetailMapper rdAssetsAmortizationDetailMapper;

    /**
     * 查询资产管理-无形资产摊销明细
     * 
     * @param id 资产管理-无形资产摊销明细主键
     * @return 资产管理-无形资产摊销明细
     */
    @Override
    public RdAssetsAmortizationDetail selectRdAssetsAmortizationDetailById(Long id)
    {
        return rdAssetsAmortizationDetailMapper.selectRdAssetsAmortizationDetailById(id);
    }

    /**
     * 查询资产管理-无形资产摊销明细列表
     * 
     * @param rdAssetsAmortizationDetail 资产管理-无形资产摊销明细
     * @return 资产管理-无形资产摊销明细
     */
    @Override
    public List<RdAssetsAmortizationDetail> selectRdAssetsAmortizationDetailList(RdAssetsAmortizationDetail rdAssetsAmortizationDetail)
    {
        return rdAssetsAmortizationDetailMapper.selectRdAssetsAmortizationDetailList(rdAssetsAmortizationDetail);
    }

    /**
     * 新增资产管理-无形资产摊销明细
     * 
     * @param rdAssetsAmortizationDetail 资产管理-无形资产摊销明细
     * @return 结果
     */
    @Override
    public int insertRdAssetsAmortizationDetail(RdAssetsAmortizationDetail rdAssetsAmortizationDetail)
    {
        rdAssetsAmortizationDetail.setCreateTime(DateUtils.getNowDate());
        return rdAssetsAmortizationDetailMapper.insertRdAssetsAmortizationDetail(rdAssetsAmortizationDetail);
    }

    /**
     * 修改资产管理-无形资产摊销明细
     * 
     * @param rdAssetsAmortizationDetail 资产管理-无形资产摊销明细
     * @return 结果
     */
    @Override
    public int updateRdAssetsAmortizationDetail(RdAssetsAmortizationDetail rdAssetsAmortizationDetail)
    {
        rdAssetsAmortizationDetail.setUpdateTime(DateUtils.getNowDate());
        return rdAssetsAmortizationDetailMapper.updateRdAssetsAmortizationDetail(rdAssetsAmortizationDetail);
    }

    /**
     * 批量删除资产管理-无形资产摊销明细
     * 
     * @param ids 需要删除的资产管理-无形资产摊销明细主键
     * @return 结果
     */
    @Override
    public int deleteRdAssetsAmortizationDetailByIds(Long[] ids)
    {
        return rdAssetsAmortizationDetailMapper.deleteRdAssetsAmortizationDetailByIds(ids);
    }

    /**
     * 删除资产管理-无形资产摊销明细信息
     * 
     * @param id 资产管理-无形资产摊销明细主键
     * @return 结果
     */
    @Override
    public int deleteRdAssetsAmortizationDetailById(Long id)
    {
        return rdAssetsAmortizationDetailMapper.deleteRdAssetsAmortizationDetailById(id);
    }
}
